home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010921-20020314 / 000111_belal@caldera.com_Sun Nov 4 19:37:03 EST 2001.msg < prev    next >
Text File  |  2020-01-01  |  5KB  |  95 lines

  1. Article: 12929 of comp.protocols.kermit.misc
  2. Newsgroups: comp.unix.sco.misc,comp.protocols.kermit.misc
  3. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!news.mailgate.org!out.nntp.be!propagator-SanJose!in.nntp.be!feedwest.news.agis.net!us.telia.net!news.mainstreet.net!feeder.nmix.net!feeder.swcp.com!192.75.213.3.MISMATCH!enigma.xenitec.on.ca!news.xenitec.on.ca!news
  4. From: Bela Lubkin <belal@caldera.com>
  5. Subject: Re: Dropping DTR in OSR5
  6. Resent-From: mmdf@xenitec.on.ca
  7. Submit-To: scomsc@xenitec.on.ca
  8. Content-Type: text/plain; charset=us-ascii
  9. Organization: [resent by] The SCOMSC gateway and Propagation Society
  10. Content-Disposition: inline
  11. Date: Mon, 5 Nov 2001 00:09:17 GMT
  12. Message-ID: <20011104160917.A13779@mammoth.ca.caldera.com>
  13. User-Agent: Mutt/1.2.5i
  14. To: scomsc@xenitec.on.ca
  15. Mime-Version: 1.0
  16. In-Reply-To: <3be5c667$0$439$8eec23a@newsreader.tycho.net>; from spcecdt@deepthought.armory.com on Sun, Nov 04, 2001 at 10:51:20PM +0000
  17. References: <9s40rp$fdh$1@newsmaster.cc.columbia.edu> <3be5c667$0$439$8eec23a@newsreader.tycho.net>
  18. Sender: belal@caldera.com
  19. Precedence: list
  20. Lines: 72
  21. Xref: newsmaster.cc.columbia.edu comp.unix.sco.misc:139886 comp.protocols.kermit.misc:12929
  22.  
  23. John DuBois wrote:
  24.  
  25. > In article <9s40rp$fdh$1@newsmaster.cc.columbia.edu>,
  26. > Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  27. > >But the real problem is that when Kermit *does* try to drop DTR briefly,
  28. > >it never comes back on.  So I need to ask: What is the way to turn off
  29. > >DTR and then turn it back on in OSR5?  Currently I am using the POSIX
  30. > >way:
  31. > >
  32. > >  cfgetospeed() and cfgetispeed() to get the speeds.
  33. > >  cfsetospeed() and cfsetispeed() to set the speed to 0.
  34. > >  tcsetattr() to make the speed changes take effect.
  35. > >  (pause)
  36. > >  cfsetospeed() and cfsetispeed() to restore the original speeds.
  37. > >  tcsetattr() to make the speed changes take effect.
  38. > >
  39. > >The same code works fine on Linux, FreeBSD, and other platforms that use
  40. > >POSIX APIs.  It appears to work fine in OSR5 too: the steps before the
  41. > >pause actually do work.  But the steps after the pause, although they
  42. > >return no error indication and do not set errno, do not in fact make DTR
  43. > >and RTS come back on (as shown by the modem lights and the failure of the
  44. > >modem to respond to further commands).
  45. > Some problems in this area were fixed in 5.0.6a.  Please test on that release
  46. > and see if you still encounter this problem.
  47.  
  48. While this is true, Frank likes to support every OS ever made.  I
  49. believe he still builds binaries for SCO Xenix.  A solution which
  50. requires users to have an OS less than a year old won't satisfy him...
  51.  
  52. The OpenServer "sio" driver doesn't implement ispeed and ospeed as
  53. separate entities.  The functions exist and the structures have all the
  54. necessary members, but it doesn't pay attention to the input rate, only
  55. the output rate.  At least, that's how it's _intended_ to work.  I
  56. vaguely remember that you can get into trouble -- confuse the driver --
  57. by trying to change both.  This might have been one of the things fixed
  58. in rs506a.  But I think the problem can be avoided on all releases, by
  59. only programming the output speed.
  60.  
  61. So, suppose you test with only changing ospeed, see whether that makes a
  62. difference?
  63.  
  64. This also isn't a general solution.  There are third party drivers that
  65. slot into the same ioctls, but _do_ correctly support independent i/o
  66. speeds.  Does Kermit have any system-specific hint settings?  Something
  67. like an OpenServer-specific "set ignore-ospeed", turned on by default?
  68. "On" is the correct default since "sio" is the most common serial driver
  69. on OpenServer, and split-speed usage is rather uncommon.
  70.  
  71. And, if I'm wrong, you might try an even kludgier workaround (which also
  72. might not work, but is definitely worth trying): after having performed
  73. all the POSIXly correct incantations, i.e. after the 2nd tcsetattr() in
  74. your pseudo-code above, force an extra open of the port:
  75.  
  76.   ...
  77.   tcsetattr()
  78.   if ((kludge_fd = open(the_port, O_RDONLY | O_NONBLOCK | O_NOCTTY)) >= 0)
  79.     close(kludge_fd);
  80.  
  81. I'm pretty sure this will cause "sio" to get its house in order and
  82. raise DTR (and the close shouldn't lower it, since the other open still
  83. exists).  For debugging purposes you might need to put in a pause before
  84. the close() to observe that DTR actually goes on -- I don't fully trust
  85. my assertion that the close() won't lower it.
  86.  
  87. One last thing.  There's a comment in the driver that implies that after
  88. cycling the baud rate through 0, DTR might not come back up immediately;
  89. might only come up when you output a character.  I'm pretty sure this is
  90. fixed in rs506a, but for older releases, see whether outputting a NUL
  91. after the 2nd tcsetattr() causes DTR to wake up.
  92.  
  93. >Bela<
  94.